package main

import (
	"flag"
	"fmt"
	"github.com/spf13/pflag"
	"github.com/spf13/viper"
)

func printViperFlag() {
	pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
	pflag.Parse()
	viper.BindPFlags(pflag.CommandLine)
	fmt.Printf("name=%s",viper.GetString("name"))
	fmt.Printf("logpath=%s",viper.GetString("logpath"))
	fmt.Printf("port=%d",viper.GetInt("port"))
	fmt.Printf("version=%d",viper.GetInt("version"))
	fmt.Println()
}